<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <h1><%= title%></h1>
  <button id="username">说出你的名字</button>
  <button id="gender">说出你的性别</button>
  <button id="color">说出你爱好的颜色</button>

  <ul id="content">

  </ul>

  <script src="axios.js"></script>
  <script>

    username.onclick = function () {
      console.log('name')
      axios.get('/msg').then(res => {
        console.log(res, 'res')
        alert(JSON.stringify(res.data.name))
      })
    }
    gender.onclick = function () {
      axios.get('/msg').then(res => {
        console.log(res, 'res')
        alert(JSON.stringify(res.data.gender))
      })
    }
    color.onclick = function () {
      axios.get('/msg').then(res => {
        console.log(res, 'res')
        alert(JSON.stringify(res.data.color))
      })
    }





  </script>
</body>




</html>